package com.siping.算法.权重轮询;

/**
 * @author YangXu
 * @date 2022/10/7
 * @description:
 */
public class Refer {
    private String serverName;
    /**
     * 当前使用该referer的调用数
     *
     * @return
     */
    private int activeRefererCount;

    /**
     * 链接是否可用
     */
    private boolean isAvailable;

    /**
     * 类路径
     */
    private String serviceKey;

    /**
     * 方法名
     */
    private String method;

    /**
     * 提供权重占比
     */
    private int weight;

    public String getServerName() {
        return serverName;
    }

    public void setServerName(String serverName) {
        this.serverName = serverName;
    }

    public int getActiveRefererCount() {
        return activeRefererCount;
    }

    public void setActiveRefererCount(int activeRefererCount) {
        this.activeRefererCount = activeRefererCount;
    }

    public boolean isAvailable() {
        return isAvailable;
    }

    public void setAvailable(boolean available) {
        isAvailable = available;
    }

    public String getServiceKey() {
        return serviceKey;
    }

    public void setServiceKey(String serviceKey) {
        this.serviceKey = serviceKey;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "Refer{" +
                "serverName='" + serverName + '\'' +
                ", activeRefererCount=" + activeRefererCount +
                ", isAvailable=" + isAvailable +
                ", serviceKey='" + serviceKey + '\'' +
                ", method='" + method + '\'' +
                ", weight=" + weight +
                '}';
    }
}
